<%@ Page Theme="Default" Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" CodeFile="ProductByNhaSX.aspx.cs" Inherits="webapp4U.UI._Default" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register Src="~/Controls/Title.ascx" TagName="Title" TagPrefix="uc" %>
<%@ Register Namespace="webapp4U.UI" TagPrefix="webapp4U" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server">

<uc:Title runat="server" ID="Title" />

<asp:UpdatePanel ID="UserUpdatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
    
<table border="0" cellpadding="4" cellspacing="0" width="500px" align="center">
<tr>
    <td align="center">
        <asp:Panel runat="server" ID="PanelMsg" Visible="false" CssClass="lblMsg">
            <%=ResourceManager.GetString("Product_ProductByCompanyEmpty")%>
        </asp:Panel>
    </td>
</tr>
<tr>
    <td align="center">
        <asp:Panel runat="server" ID="Panel_ProductByCate">
          <!-- begin San Pham -->
          <asp:DataList ID="ItemsDataList" runat="server" Width="100%" 
          RepeatDirection="Horizontal"   
          EnableViewState="False" 
          CellPadding="10" 
          ItemStyle-HorizontalAlign="left"
          RepeatColumns="3">
            <ItemTemplate>
                <table border="0" align="left" style="table-layout:fixed;">
                    <tr>
                        <td class="BorderImage" width="140" height="140" align="center">
                            <a href="<%=Globals.ApplicationPath %>Products/ProductDetail.aspx?ProductID=<%#Eval("ProductID")%>">
                                <img onmouseover="showtrail('<%=Globals.ApplicationPath %>Products/Image.ashx?Size=L&ImageUrl=<%# Eval("ImageUrl") %>','<%# Eval("Description")%>',500,500)" onmouseout="hidetrail();" border="0" src='<%=Globals.ApplicationPath %>Products/Image.ashx?Size=M&ImageUrl=<%# Eval("ImageUrl") %>' />
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" class="ProductPrice">
                            <%=ResourceManager.GetString("Product_Price") %>: <%#GetPrice((Decimal)Eval("UnitPrice")) %>
                        </td>
                    </tr>
                    <tr height="40">
                        <td align="center" style="font-weight:bold; color:#5ed3f6">
                            <a class="ProductName" href="<%=Globals.ApplicationPath %>Products/ProductDetail.aspx?ProductID=<%#Eval("ProductID")%>"><%# Eval("Title")%></a>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" height="20px;">
                            <asp:Panel runat=server ID="PanelAddToCart">
                                <a href="<%=Globals.ApplicationPath %>Products/ShoppingCart.aspx?ProductID=<%#Eval("ProductID")%>&Action=AddToCart">
                                    <%#GetButtonAddToCart((Decimal)Eval("UnitPrice")) %>
                                </a>
                            </asp:Panel>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
          </asp:DataList>
        <!-- end San Pham -->
        </asp:Panel>
    </td>
</tr>
</table>

<div align="center">
    <asp:Panel ID="DisplayPager" Visible="True" runat="server">
        <div align="center">
            <table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
                <tr>
                    <td valign="middle" align="center">
                        <webapp4U:Pager ID="Pager" runat="server" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</div>
                     
   </ContentTemplate>
</asp:UpdatePanel>    

</asp:Content>

